package inabit.inabitcompiler.productions.rule.expressions;

import inabit.compiler.parser.grammar.NonTerminal;
import inabit.compiler.parser.grammar.Production;
import inabit.compiler.parser.grammar.Symbol;
import inabit.compiler.parser.grammar.Terminal;
import inabit.data.expression.RelationalExpression;
import inabit.inabitcompiler.lexical.InabitTokenClass;
import inabit.inabitcompiler.parser.InabitSemanticAction;

/**O -> >*/
/**@author Rafael Rocha*/
public class O_Rule3 extends Production{

	public O_Rule3() {
		super("O");
	}

	@Override
	protected Symbol[] production(final NonTerminal nonTerminal) {
		Symbol[] symbols = {
			new Terminal(InabitTokenClass.GREATER_THAN),
			new InabitSemanticAction(nonTerminal) {
				public void execute() {
					nonTerminal.code = Integer.toString(RelationalExpression.GREATER_THAN);
				}
			}
		};
		return symbols;
	}

}
